package com.baitiaojun.video.mapper;

import com.baitiaojun.api.domain.video.VideoCoin;
import org.apache.ibatis.annotations.Param;

public interface VideoCoinMapper {
    int deleteByPrimaryKey(Long id);

    int insert(VideoCoin record);

    int insertSelective(VideoCoin record);

    VideoCoin selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(VideoCoin record);

    int updateByPrimaryKey(VideoCoin record);

    Integer isCoinOperated(@Param("userId") Long userId, @Param("videoId") Long videoId);

    Integer selectVideoCoinCount(Long videoId);

    Integer selectVideoCoinByVideoIdAndUserId(@Param("videoId") Long videoId, @Param("userId") Long userId);
}